These are the stories of three men who met and talked with Yahushua (Jesus), the Master. They demonstrate the true doctrines of salvation by faith, and salvation by "keeping HIS law" (desire, intent, choice), and the false doctrine of attempting salvation by KEEPING the law (good works).
KEEPING the law (good works)
And, behold, one came and said unto him, Good Rabbi, what good thing shall I do, that I may have eternal life? And he said unto him, Why callest thou me good? there is none good but one, that is, Elohim [god]: but if thou wilt enter into life, keep the commandments. He saith unto him, Which? Yahushua said, Thou shalt do no murder, Thou shalt not commit adultery, Thou shalt not steal, Thou shalt not bear false witness, Honour thy father and thy mother: and, Thou shalt love thy neighbour as thyself. The young man saith unto him, All these things have I kept from my youth up: what lack I yet? Yahushua said unto him, If thou wilt be perfect, go and sell that thou hast, and give to the poor, and thou shalt have treasure in heaven: and come and follow me. Matthew 19:16-21
This "young man" falsely believed himself "good", even after being told that "there is none good but one". He started his conversation with a false premise, "what good thing shall I do" to be saved. If one is planning on being saved by good deeds, they must be perfect. But none are. If one could be perfect, they could/would be saved because of their perfection. But ALL have sinned (none are perfect).
"For all have sinned, and come short of the glory of יהוה [Yahweh, our god];" Romans 3:23
Yahushua (Jesus) told the young man that if he would be "perfect" he should sell everything, give it to the poor, and follow the Master. Nobody claims that this is a requirement for salvation, so did the Master lie? No, he was correct. Perfection could save, but since no one is perfect, he demonstrated the young man's deficiency.
keeping HIS law (intent)
The second man, a lawyer didn't start with a false premise. He simply asked "what shall I do to inherit eternal life?"
And, behold, a certain lawyer stood up, and tempted [tested] him, saying, Master, what shall I do to inherit eternal life? He said unto him, What is written in the law? how readest thou? And he answering said, Thou shalt love יהוה [Yahweh] thy Elohim [god] with all thy heart, and with all thy soul, and with all thy strength, and with all thy mind; and thy neighbour as thyself. And he said unto him, Thou hast answered right: this do, and thou shalt live. Luke 10:25-28
The difference between the two men seems subtle, but is actually HUGE. Let's see if we can make sense of it.
The first man thought that he could earn salvation through his own perfection (KEEPING the law - external good works). This was not possible because he was not perfect (even though he thought he was), basing his perfection on external action (the physical). He was given an impossible task (for him) which showed his imperfection.
Imperfection wasn't his downfall (everyone is imperfect). Falsely thinking he was perfect (good) was his problem.
Yahushua (Jesus) told the second man that he was correct, so there must be a difference. I propose that his correct understanding was "keeping HIS law" (internal spiritual intent) rather than "KEEPING his law" (external, physical good works).
We can have good intentions (the desire to obey) even while failing in our external performance and actions.
Paul describes this in great detail (see all of Romans 7, especially verse 5 onward):
"For I know that in me (that is, in my flesh,) dwelleth no good thing: for to will [spiritual intent] is present with me; but how to perform [physical action] that which is good I find not. For the good that I would I do not: but the evil which I would not, that I do. Now if I do that I would not, it is no more I that do it, but sin that dwelleth in me... O wretched man that I am!" (Brackets [ ] added, ed.) Romans 7:18-20, 24
Translation... If I have good intent but fail, my failing is NOT my will (intent), but the fault of the sin within me.
The desire of the man in the first story, was to be good - an impossibility - "KEEPING his law".
The desire of the second man was to love and serve God (not Satan or some other idol or god) with all his heart - "keeping HIS law" (good intent). This man didn't claim any goodness or that it was required or even possible. The Master told him that he was correct and would live. The "desire to serve and obey him" IS "keeping HIS law" and will result in salvation.
The third man was one of the thieves on the cross. He certainly didn't claim to be good or have any goodness at all. He admitted he was a sinner. Sinning doesn't keep one from heaven. If it did, no one could be saved because ALL have sinned. His story describes the third path. Salvation by faith (see Salvation By Faith)
"And one of the malefactors which were hanged railed on him, saying, If thou be the Messiah, save thyself and us. But the other answering rebuked him, saying, Dost not thou fear Elohim [god], seeing thou art in the same condemnation? And we indeed justly; for we receive the due reward of our deeds: but this man hath done nothing amiss. And he said unto Yahushua [Jesus], Rabbi, remember me when thou comest into thy kingdom. And Yahushua said unto him, Verily I say unto thee To day[,] shalt thou be with me in paradise." Luke 23:39-43
1. This thief understood the issue was about kingdom. He didn't ask to join the Master's church.
2. He admitted his sinfulness (absence of goodness).
3. He had sufficient faith to ask (intent).
4. He was rewarded with a promise of salvation.
These three stories demonstrate two paths to salvation and one path to nowhere. It's interesting that the easiest, most perfect path is demonstrated by the worst (and admitted) sinner. Not the "good" young man, not the upstanding lawyer, but the worst sinner. God examines the heart [spiritual intent] not actions [external, physical performance].
"... for יהוה [Yahweh, our god] seeth not as man seeth; for man looketh on the outward appearance, but יהוה looketh on the heart." 1 Samuel 16:7